package com.jeesite.common.utils.excel.fieldtype;

import com.jeesite.common.utils.SpringUtils;
import com.jeesite.modules.fl.entity.Clinic;
import com.jeesite.modules.fl.service.ClinicService;

public class ClinicType {

	private static ClinicService clinicService = SpringUtils.getBean(ClinicService.class);

	public static Object getValue(String val)
    {
        return clinicService.getByName(val);
    }
	
	public static String setValue(Object val)
    {
        if(val instanceof Clinic) {
        	Clinic clinic = (Clinic)val;
          return clinic.getName();
        } else {
          return "";
        }
    }
}
